import 'package:flutter/material.dart';



class ShopPage extends StatefulWidget {

  //接受命名路由传值
  //因为路由跳转设置中设置了arguments，所以此处必须使用arguments作为传递参数
  final Map arguments;

  const ShopPage({
    super.key,
    required this.arguments,
  });

  @override
  State<ShopPage> createState() => _ShopPageState();
}

class _ShopPageState extends State<ShopPage> {

  //接受上方传递过来的参数
  @override
  void initState(){
    super.initState();
    //控制台打印
    print(widget.arguments);
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text("shop"),
      ),
      body: const Center(
        child: Text("shop页面"),
      ),
    );
  }
}
